package com.virtualCat.entity;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.virtualCat.util.CustomDateSerializer;

import java.io.Serializable;
import java.util.Date;

public class Order implements Serializable {
    private String orderid;
    private String openid;
    private int catid;
    @JsonSerialize(using = CustomDateSerializer.class)
    private Date datetime;
    private float price;
    private String receiver;
    private String phone;
    private String area;
    private String build_number;
    private String cname;
    private String gname;
    private String gimg;
    private int status;

    public Order(){}

    public Order(String orderid, String openid, int catid, Date datetime, float price, String receiver, String phone, String area, String build_number,
                 String cname, String gname, String gimg, int status) {
        this.orderid = orderid;
        this.openid = openid;
        this.catid = catid;
        this.datetime = datetime;
        this.price = price;
        this.receiver = receiver;
        this.phone = phone;
        this.area = area;
        this.build_number = build_number;
        this.cname = cname;
        this.gname = gname;
        this.gimg = gimg;
        this.status = status;
    }

    public String getOrderid() {
        return orderid;
    }

    public void setOrderid(String orderid) {
        this.orderid = orderid;
    }

    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    public int getCatid() {
        return catid;
    }

    public void setCatid(int catid) {
        this.catid = catid;
    }

    public Date getDatetime() {
        return datetime;
    }

    public void setDatetime(Date datetime) {
        this.datetime = datetime;
    }

    public float getPrice() {
        return price;
    }

    public void setPrice(float price) {
        this.price = price;
    }

    public String getReceiver() {
        return receiver;
    }

    public void setReceiver(String receiver) {
        this.receiver = receiver;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    public String getBuild_number() {
        return build_number;
    }

    public void setBuild_number(String build_number) {
        this.build_number = build_number;
    }

    public String getCname() {
        return cname;
    }

    public void setCname(String cname) {
        this.cname = cname;
    }

    public String getGname() {
        return gname;
    }

    public void setGname(String gname) {
        this.gname = gname;
    }

    public String getGimg() {
        return gimg;
    }

    public void setGimg(String gimg) {
        this.gimg = gimg;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return "Order{" +
                "orderid='" + orderid + '\'' +
                ", openid='" + openid + '\'' +
                ", catid=" + catid +
                ", datetime=" + datetime +
                ", price=" + price +
                ", receiver='" + receiver + '\'' +
                ", phone='" + phone + '\'' +
                ", area='" + area + '\'' +
                ", build_number='" + build_number + '\'' +
                ", cname='" + cname + '\'' +
                ", gname='" + gname + '\'' +
                ", gimg='" + gimg + '\'' +
                ", status=" + status +
                '}';
    }
}